package com.slipper.core.transaction;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.slipper.exception.CommonException;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Transactional(
        propagation = Propagation.SUPPORTS, 
        readOnly = true, 
        rollbackFor = {CommonException.class, RuntimeException.class, Throwable.class, Exception.class})
public @interface ReadTransactional {
}